import request from '@/utils/request'

// 查询班级管理列表
export function listMetaclass(query) {
  return request({
    url: '/score/metaclass/list',
    method: 'get',
    params: query
  })
}

// 查询班级管理详细
export function getMetaclass(meataclassId) {
  return request({
    url: '/score/metaclass/' + meataclassId,
    method: 'get'
  })
}

export function listStudentByClass(metaclassId) {
  return request({
    // url: '/score/metaclass/listStudent' + metaclassId,
    url: `/score/metaclass/listStudent/${metaclassId}`,
    method: 'get'
  })
}

// 新增班级管理
export function addMetaclass(data) {
  return request({
    url: '/score/metaclass',
    method: 'post',
    data: data
  })
}

// 修改班级管理
export function updateMetaclass(data) {
  return request({
    url: '/score/metaclass',
    method: 'put',
    data: data
  })
}

// 删除班级管理
export function delMetaclass(meataclassId) {
  return request({
    url: '/score/metaclass/' + meataclassId,
    method: 'delete'
  })
}
